#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
unordered_map<int, int> mp;
int main() {
  int n;
  cin >> n;
  while (n--) {
    int a;
    cin >> a;
    for (int i = 2; i <= a / i; ++i) {
      int cnt = 0;
      while (a % i == 0) {
        cnt++;
        a /= i;
      }
      mp[i] += cnt;
    }
    if (a > 1) mp[a]++;
  }

  long long ans = 1;
  for (auto [q, a] : mp) {
    long long t = 1;
    while (a--) {
      t = (t * q + 1) % MOD;
    }
    ans = (ans * t) % MOD;
  }

  cout << ans << endl;
}
